package com.xx.sg.own.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.xx.sg.own.entity.Camera;
import com.xx.sg.own.mapper.CameraMapper;
import com.xx.sg.own.service.CameraService;
import org.springframework.stereotype.Service;

@Service
public class CameraServiceImpl extends ServiceImpl<CameraMapper, Camera> implements CameraService {

    @Override
    public Camera getCameraByCode(String code) {
        LambdaQueryWrapper<Camera> wrapper = new LambdaQueryWrapper<Camera>();
        wrapper.eq(Camera::getIndexCode, code);
        return this.getOne(wrapper);
    }
}
